package com.langshixiaobai.mqdemo.server.mapper;

import com.langshixiaobai.mqdemo.server.core.Binding;
import com.langshixiaobai.mqdemo.server.core.Exchange;
import com.langshixiaobai.mqdemo.server.core.MSGQueue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MetaMapper {
    //创建交换机表
    void createExchangeTable();
    //创建队列表
    void createQueueTable();
    //创建绑定关系表
    void createBindingTable();


    void insertExchange(Exchange exchange);

    void deleteExchange(String name);

    void insertQueue(MSGQueue queue);

    void deleteQueue(String name);

    void insertBinding(Binding binding);

    void deleteBinding(Binding binding);

    List<Exchange> selectAllExchange();

    List<MSGQueue> selectAllQueue();

    List<Binding> selectAllBinding();


}
